<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> 
    <title>Document</title>
    <style type="text/css">  
        html{height:100%}    
        body{height:100%;margin:0px;padding:0px}    
        #container{height:100%}    
    </style> 
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&&type=webgl&ak=idpQLVAlWqcZ6ETJCo32LzADD2f6TT4W">
    </script>
</head>
<body>
    <button onclick="setCenter()">click</button>
<div id="text">111</div>
    <div id="container"></div> 
</body>
<script type="text/javascript"> 

var map = new BMapGL.Map("container");
var point = new BMapGL.Point(116.404, 39.915);


map.centerAndZoom(point, 15); 

function  setCenter(){

}
   function test(lat,lnt) {
   var point = new BMapGL.Point(lat,lnt);
    map.centerAndZoom(point, 20);
    var marker = new BMapGL.Marker(new BMapGL.Point(lat,lnt),{
    icon: myIcon
});
    map.addOverlay(marker);
      console.log('Ark WebComponent',lat,lnt)
      return lat+'-'+lnt
  }

</script>
</html>